#!/bin/sh /etc/rc.common

START=96
USE_PROCD=1
PCBIN="/usr/bin/pc_schedule"


stop_service(){
	killall -9 pc_schedule
	rmmod parental_control
}

start_service(){
	local enable=`uci -q get parental_control.global.enable`
	if [ "$enable" != "1" ];then
			return 0
	fi

	ln -s /etc/parental_control/app_feature.cfg  /tmp/pc_app_feature.cfg
	insmod parental_control
	rm /tmp/pc_app_feature.cfg
	procd_open_instance
	procd_set_param respawn 60 5 5
	procd_set_param stderr 1
	procd_set_param command "$PCBIN"
	procd_close_instance
}